Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit 9fcd9f5
☁️ Nx Cloud last updated this comment at |
totp.key to screen statetotp.key to screen state
/Users/tomer/dev/go/src/github.com/descope/web-components-ui/packages/libs/common
There was a problem hiding this comment.
Pull request overview
This PR adds support for forwarding the TOTP key value from the screen state to screen inputs, enabling forms to access and display the TOTP secret key in addition to the existing QR code image and provisioning URL.
Changes:
- Extends the
ScreenStatetype to include an optionalkeyfield in thetotpobject - Updates
updateScreenFromScreenStateto maptotp.keyfrom screen state to an input field namedtotp.key
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/sdks/web-component/src/lib/types.ts | Adds optional key field to the totp object in ScreenState interface |
| packages/sdks/web-component/src/lib/helpers/templates.ts | Updates updateScreenFromScreenState to forward totp.key to screen inputs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| replaceElementInputs(baseEle, screenState?.inputs); | ||
| const screenInputs = { | ||
| ...screenState?.inputs, | ||
| ...(screenState?.totp?.key ? { 'totp.key': screenState.totp.key } : {}), |
There was a problem hiding this comment.
I don't see we are passing the other totp keys here,
so why do we need special treatment for this one?
There was a problem hiding this comment.
Because we want to support the population of this one in a read-only input TOTP Key editor component.
Related Issues
Related https://github.com/descope/etc/issues/13800
Related PRs
Description
A few sentences describing the overall goals of the pull request's commits.
Must